﻿<style>
    .points-table {
        min-width: 98%;
        width: auto;
    }

        .points-table th {
            background-color: #444;
            color: #eee;
            font-family: "Microsoft YaHei";
            min-width: 120px;
        }

        .points-table td {
            background-color: #fff;
        }

        .points-table th, .points-table td {
            text-align: center;
            padding: 10px 0;
        }
</style>

@{
    var Items = ViewBag.Items;
    var Names = ViewBag.Names;
    var Times = ViewBag.Times;
    }

<table class="points-table">
    <thead>
        <tr>
            <th>Point/Date</th>
            @{for (var i = 0; i < Items.Count; i++)
              {
                <th>@Times[i]</th>
              }
            }
        </tr>

    </thead>
    <tbody>
        @{for (var i = 0; i < Names.Count; i++)
          {
            <tr>
                <td>@Names[i]</td>
                @{for (var j = 0; j < Items.Count; j++)
                  {
                      if (Items[j][i] == null||double.IsNaN(Items[j][i].Value))
                      {
                        <td></td>
                      }
                      else
                      {         
                        <td>@Items[j][i].Value</td> 
                      }

                  }
                }
            </tr>
          }
        }
    </tbody>
</table>